<div class="hbox hbox-auto-xs hbox-auto-sm font-chinese" ng-init="
    app.settings.asideFolded = false;
    app.settings.asideDock = false;
  " ng-controller="DistributionController">
    <div class="bg-light lter b-b wrapper-md font-chinese">
        <h5 class="m-n font-bold h5">配送信息</h5>
    </div>
    <div class="row clearfix m-t-md">
        <div class="col-md-12 column">
            <div class="panel panel-default">
                <div class="panel-body ">
                    <form class="bs-example form-horizontal form-validation" name="form">

                        <div class="form-group">
                            <label class="col-lg-2 control-label">配送方式：</label>
                            <div class="radio col-lg-3">
                                <label class="i-checks">
                                    <input type="radio" name="delivery" value="0" ng-model="dis.delivery" >
                                    <i></i>
                                    平台配送（每单一元平台代收）
                                </label>
                            </div>
                            <div class="radio col-lg-3">
                                <label class="i-checks">
                                    <input type="radio" name="delivery" value="1" ng-model="dis.delivery" >
                                    <i></i>
                                    卖家配送
                                </label>
                            </div>
                            <div class="checkbox col-lg-3" ng-if="dis.delivery==1">
                                <label class="i-checks">
                                    <input type="checkbox" ng-click="setFreeCheck()" ng-checked="freeDistribution">
                                    <i></i>
                                    免运费
                                </label>
                            </div>
                        </div>
                        <div class="form-group" ng-if="!freeDistribution">
                            <label class="col-lg-2 control-label">配送费：</label>
                            <div class="col-lg-3 input-group m-b">
                                <input type="number" class="form-control" placeholder="请输入配送费，最高7元" ng-model="dis.deliveryPrice" ng-disabled="dis.delivery!=1" ui-validate=" '$value <= 7' " ng-required="dis.delivery==1 && !freeDistribution">
                                <span class="input-group-addon" >元</span>
                            </div>
                        </div>

                        <div class="form-group" ng-if="!freeDistribution">
                            <label class="col-lg-2 control-label">起送金额：</label>
                            <div class="col-lg-3 input-group m-b">
                                <input type="number" class="form-control" placeholder="设置0元起送会有更多订单" ng-model="dis.startDeliveryPrice" ng-disabled="dis.delivery!=1" ng-required="dis.delivery==1 && !freeDistribution">
                                <span class="input-group-addon">元</span>
                            </div>
                        </div>
                        <div class="form-group" ng-if="!freeDistribution">
                            <label class="col-lg-2 control-label">是否满额免费送：</label>
                            <div class="radio col-lg-1">
                                <label class="i-checks">
                                    <input type="radio"  value="1" ng-model="freeForFull" ng-disabled="dis.delivery!=1">
                                    <i></i>
                                    是
                                </label>
                            </div>
                            <div class="radio col-lg-1">
                                <label class="i-checks">
                                    <input type="radio"  value="0" ng-model="freeForFull" ng-disabled="dis.delivery!=1">
                                    <i></i>
                                    否
                                </label>
                            </div>
                            <div class="col-lg-1 input-group m-b">
                                <input type="number" class="form-control" placeholder="" ng-model="dis.freeShip" ng-disabled="freeForFull!=1" ng-required="dis.delivery==1 && freeForFull==1">
                                <span class="input-group-addon">元</span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-lg-2 control-label">配送范围：</label>
                            <div class="col-lg-2">
                                <select class="form-control" ng-model="dis.deliveryDistance" ng-disabled="dis.delivery!=1">
                                    <option value="5">5公里</option>
                                    <option value="10">10公里</option>
                                </select>
                            </div>
                        </div>

                        <div class="form-group" >
                            <div class="col-lg-5"></div>
                            <button type="submit" class="col-lg-2 btn btn-primary btn-lg" ng-click="submit()" style="margin-top:50px;"  ng-disabled='dis.delivery==1 && form.$invalid'>提交</button>
                            <div class="col-lg-5"></div>
                        </div>
                    </form>
                </div>


            </div>



        </div>
    </div>
    <div class="row">
        <div class=""></div>
    </div>
    <div class="text-center" ng-include="'tpl/blocks/page_footer.html'"></div>
</div>